package com.dudu.dao;

import java.sql.Connection;
import java.util.List;

import net.sf.json.JSONObject;

import org.apache.log4j.Logger;

import core.CoreDao;
import core.db.DBConnectionUtil;


public class ReportCustDao {

	private static final Logger log =  core.util.Logger.getLogger(ReportCustDao.class.getSimpleName());
	
	
	public List<JSONObject> queryAll(CoreDao dao) {
		//数据库连接
		Connection con = null;
		//最后所需返回值
		List<JSONObject> result = null;

		try {
			//获取数据库连接
			con = DBConnectionUtil.getDBConnection("emate1");
			//拼写sql
			StringBuffer sql = new StringBuffer(" select * from t_report_cust ");
			result = dao.serviceJsonSql(con, sql.toString(), new Object[] { null });

		} catch (Exception ex) {
			ex.printStackTrace();
		} finally {
			DBConnectionUtil.close(null, null, con);
		}
		return result;
	}

}
